package com.bigdata.demo.web.form;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;


public class CRReportSearch {

    private String _all;

    public String getId_key_cr() {
        return id_key_cr;
    }

    public void setId_key_cr(String id_key_cr) {
        this.id_key_cr = id_key_cr;
    }

    private String id_key_cr;
    private String cr_no;
    private String cr_equipment;
    private String cr_system;
    private String cr_date;
    private String cr_subject;
    private String cr_desc;
    private String cr_result;
    private String cr_action;
    private String cr_cause;

    private String cano;

    private String erno;

    private String kks;

    public String getKks() {
        return kks;
    }

    public void setKks(String kks) {
        this.kks = kks;
    }

    public String getErno() {
        return erno;
    }

    public void setErno(String erno) {
        this.erno = erno;
    }

    public String getCano() {
        return cano;
    }

    public void setCano(String cano) {
        this.cano = cano;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    private String keyword;

    private String orderBy = "cr_date";
    private String orderDirection = "desc";
    private int start = 0;

    private int size = 10;

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    private int length;


    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getSize() {
        if (this.size < 1) {
            return 5;
        } else if (this.size > 100) {
            return 100;
        } else {
            return this.size;
        }
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String get_all() {
        return _all;
    }

    public void set_all(String _all) {
        this._all = _all;
    }

    public String getCr_no() {
        return cr_no;
    }

    public void setCr_no(String cr_no) {
        this.cr_no = cr_no;
    }

    public String getCr_equipment() {
        return cr_equipment;
    }

    public void setCr_equipment(String cr_equipment) {
        this.cr_equipment = cr_equipment;
    }

    public String getCr_system() {
        return cr_system;
    }

    public void setCr_system(String cr_system) {
        this.cr_system = cr_system;
    }

    public String getCr_date() {
        return cr_date;
    }

    public void setCr_date(String cr_date) {
        this.cr_date = cr_date;
    }

    public String getCr_subject() {
        return cr_subject;
    }

    public void setCr_subject(String cr_subject) {
        this.cr_subject = cr_subject;
    }

    public String getCr_desc() {
        return cr_desc;
    }

    public void setCr_desc(String cr_desc) {
        this.cr_desc = cr_desc;
    }

    public String getCr_result() {
        return cr_result;
    }

    public void setCr_result(String cr_result) {
        this.cr_result = cr_result;
    }

    public String getCr_action() {
        return cr_action;
    }

    public void setCr_action(String cr_action) {
        this.cr_action = cr_action;
    }

    public String getCr_cause() {
        return cr_cause;
    }

    public void setCr_cause(String cr_cause) {
        this.cr_cause = cr_cause;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getOrderDirection() {
        return orderDirection;
    }

    public void setOrderDirection(String orderDirection) {
        this.orderDirection = orderDirection;
    }

    @Override
    public String toString() {
        return "CRReportSearch{" +
                "cr_no='" + cr_no + '\'' +
                ", cr_equipment='" + cr_equipment + '\'' +
                ", cr_system='" + cr_system + '\'' +
                ", cr_date='" + cr_date + '\'' +
                ", cr_subject='" + cr_subject + '\'' +
                ", cr_desc='" + cr_desc + '\'' +
                ", cr_result='" + cr_result + '\'' +
                ", cr_action='" + cr_action + '\'' +
                ", cr_cause='" + cr_cause + '\'' +
                ", orderBy='" + orderBy + '\'' +
                ", orderDirection='" + orderDirection + '\'' +
                '}';
    }
}
